x86/pv: Fix construction of 32bit dom0's
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Mar 2019 16:09:08 +0000 (17:09 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 18 Mar 2019 16:09:08 +0000 (17:09 +0100)
commit718a8d2e9cbacb14f86f6dee40732727cd79bcff
treed8fdba45ccff9f0a4e19b5407912ee3f547fd51b
parentfc46e159a6b1c379a0dac918120267b606d4defd
x86/pv: Fix construction of 32bit dom0's

dom0_construct_pv() has logic to transition dom0 into a compat domain when
booting an ELF32 image.

One aspect which is missing is the CPUID policy recalculation, meaning that a
32bit dom0 sees a 64bit policy, which differ by the Long Mode feature flag in
particular.  Another missing item is the x87_fip_width initialisation.

Update dom0_construct_pv() to use switch_compat(), rather than retaining the
opencoding.  Position the call to switch_compat() such that the compat32 local
variable can disappear entirely.

The 32bit monitor table is now created by setup_compat_l4(), avoiding the need
to for manual creation later.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 356f437171c5bb90701ac9dd7ba4dbbd05988e38
master date: 2019-03-15 14:59:27 +0000
xen/arch/x86/pv/dom0_build.c
xen/arch/x86/pv/domain.c